package com.sec.android.app.myfiles.widget.tablet;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.HorizontalScrollView;

import com.sec.android.app.myfiles.log.Log;


public class MyFilesHorizontalScrollView extends HorizontalScrollView {
    private boolean mScrollable = true;

    public MyFilesHorizontalScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        boolean ret = false;
        if (mScrollable) {
            ret = super.onInterceptTouchEvent(ev);
        } else {
            Log.d(this, "onInterceptTouchEvent - " + mScrollable);
        }
        return ret;
    }

    public void setScrollable(boolean scrollable) {
        mScrollable = scrollable;
    }
}
